class ComplexCustomOverlay{

    constructor(BMap,point,text,mp,maker,text1){
      this._point=point;
      this._text=text;
      var thisOfCom =this;
      this.__proto__ = new BMap.Overlay();
      this.__proto__.initialize=function (map) {
        this.map = map;
        var dom = maker.makeADom(text,point,BMap,text1);
        thisOfCom.div=dom;
        var that = this;
        mp.getPanes().labelPane.appendChild(dom);
        return dom;
      }
      this.__proto__.draw=function () {
        var map = mp;
        var pixel = map.pointToOverlayPixel(this._point);
        this.div.style.left = pixel.x - this.div.offsetWidth/2  + "px";
        this.div.style.top  = pixel.y - this.div.offsetHeight/2 + "px";
      }
    }

}
export default ComplexCustomOverlay;
